package com.anonymous.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Nebula
 * @version 1.0
 * @date 2022/1/16 19:33
 */
@Controller
public class JumpController {

    @RequestMapping("index")
    public String toLogin() {
        return "/html/index";
    }

    @RequestMapping("add")
    public String toAdd() {
        return "html/jie/add";
    }

    @RequestMapping("delete")
    public String deletePost() {
        return "test/deletePost";
    }

    @RequestMapping("show")
    public String showPost() {
        return "test/showPost";
    }
//    //   user/jie/index.html
//    @RequestMapping("/user/jie/{path}")
//    public String jump(@PathVariable String path){
//        path=path.substring(0,path.length()-5);
//        return "/html/jie/"+path;
//    }

}
